package com.xuelang.pipeline.app.resource.converter;

import com.xuelang.pipeline.client.resource.dto.CloudEnvironmentDTO;
import com.xuelang.pipeline.domain.resource.CloudEnvironment;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

/**
 * 多云环境DTO与多云环境实体转换器
 *
 * @author xiwen.zxg
 * @since 2024/5/15
 */
@Mapper
public interface CloudEnvironmentDTOToCloudEnvironmentConverter {
    CloudEnvironmentDTOToCloudEnvironmentConverter INSTANCE = Mappers.getMapper(CloudEnvironmentDTOToCloudEnvironmentConverter.class);

    /**
     * CloudEnvironment转化为CloudEnvironmentDTO
     * @param cloudEnvironment
     * @return
     */
    CloudEnvironmentDTO cloudEnvironmentToCloudEnvironmentDTO(CloudEnvironment cloudEnvironment);

    /**
     * CloudEnvironmentDTO转化为CloudEnvironment
     * @param cloudEnvironmentDTO
     * @return
     */
    CloudEnvironment cloudEnvironmentDTOToCloudEnvironment(CloudEnvironmentDTO cloudEnvironmentDTO);
}
